package com.ruoyi.web.controller.business;

import com.ruoyi.common.utils.DateUtils;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class test {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();

        // 预约开始时间 下发二维码
        Date nowDate = DateUtils.getNowDate();
        calendar.setTime(nowDate);
        calendar.add(Calendar.MINUTE, -5);
        Date startDateFrom = calendar.getTime();

        calendar.setTime(nowDate);
        calendar.add(Calendar.MINUTE, 35);
        Date startDateTo = calendar.getTime();

        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

        System.out.println(formatter.format(startDateFrom));
        System.out.println(formatter.format(startDateTo));
    }
}
